package net.ikenway.springboot.demo.Model.Dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import net.ikenway.springboot.demo.Model.Entity.OrderSub;
import net.ikenway.springboot.demo.Model.Entity.Product;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * @author MasterKenway <zk@ikenway.net>
 * @Description
 * @date Created Date 12/18/2020
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class OrderSubDto implements Serializable {
    @NotNull(message = "商品不能为空")
    @NotEmpty(message = "商品不能为空")
    private Long productId;

    private String productName;

    private Float disCount;
    private BigDecimal actualPrice;

    @NotNull(message = "加料不能为空")
    @NotEmpty(message = "加料不能为空")
    private OrderSub.Additions additions;

    @NotNull(message = "规格不能为空")
    @NotEmpty(message = "规格不能为空")
    private OrderSub.Scale scale;
}
